import java.util.ArrayList;

/**
 * Decription 本地栈溢出
 *  -Xxx108k
 * Date 2017/10/6 15:30
 * authur MangoDai
 **/
public class StackLeak {
    private ArrayList<Object> arrayList = new ArrayList<>();
    private int stackLength = 1;
    public void stackLeak() {
        stackLength++;
        arrayList.add("asd");
        stackLeak();
    }
    public void stackLeak1() {
        stackLength++;
        arrayList.add("asd");
    }
    public void stackLeak2() {
        stackLength++;
        arrayList.add("asd");
    }
    public static void main(String[] args) {
        StackLeak leak = new StackLeak();
        try {
            leak.stackLeak();
        } catch (Throwable throwable) {
            System.out.println("leak length = " + leak.stackLength);
            throw throwable;
        }
    }
}
